/*
 * Camera.h
 *
 *  Created on: Sep 30, 2009
 *      Author: tiago.zaccaro
 */

#ifndef CAMERA_H_
#define CAMERA_H_

#include "Prerequisites.h"

namespace AcquaEngine {

namespace Graphics {

class Camera {
protected:
	Ogre::Camera *mCamera;
	Ogre::SceneNode *mCameraNode;
	Ogre::SceneNode *mCameraYawNode;
	Ogre::Radian mPitchLimit;
public:
	Camera();
	Camera(Ogre::Camera *camera);
	virtual ~Camera();

	void pitch(const Ogre::Real degrees);
	void yaw(const Ogre::Real degrees);
	void roll(const Ogre::Real degrees);

	Ogre::Vector3 getPosition();
	void setPosition(const Ogre::Vector3 &position);

	ACQUAENGINE_INLINE void translate(const Ogre::Vector3 &delta) { setPosition(getPosition() + delta); }

	void moveRelative(const Ogre::Vector3 &vector);
	void moveRelativeToCamera(const Ogre::Vector3 &vector);
	Ogre::Vector3 getDirection();
	void setDirection(const Ogre::Vector3 &direction);
	Ogre::Quaternion getOrientation();
	Ogre::Quaternion getCameraOrientation();
	void setOrientation(const Ogre::Quaternion &orientation);
	Ogre::Real getPitchLimit();
	void setPitchLimit(Ogre::Real degrees);
	Ogre::SceneNode *Camera::getSceneNode();
	Ogre::Vector3 getUp();
	Ogre::Vector3 getRight();
	Ogre::Camera *getCamera();
};

}

}

#endif /* CAMERA_H_ */
